package com.niguang.labour.admin.entity;

import java.io.Serializable;

import java.util.Date;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * <p>
 * </p>
 *
 * @author
 * @since 2018-06-10
 */
@TableName("admin_labor_user")
@NoArgsConstructor
@Data
public class AdminLaborUser extends Model<AdminLaborUser> {

    private static final long serialVersionUID = 1L;

    private Long id;
    /**
     * 用户名称
     */
    @TableField("user_name")
    private String userName;
    /**
     * 手机号码
     */
    @TableField("user_phone")
    private String userPhone;
    /**
     * 用户密码
     */
    @TableField("user_pwd")
    private String userPwd;
    /**
     * 劳务公司
     */
    @TableField("labor_company_id")
    private Long laborCompanyId;

    @TableField("id_card")
    private String idCard;

    @TableField("id_card_front")
    private String idCardFront;

    @TableField("id_card_back")
    private String idCardBack;


    @TableField("create_time")
    private Date createTime;
    @TableField("del_flag")
    private Integer delFlag;
    private transient String laborCompanyName;

    public static final String ID = "id";

    public static final String USER_NAME = "user_name";

    public static final String USER_PHONE = "user_phone";

    public static final String USER_PWD = "user_pwd";

    public static final String LABOR_COMPANY_ID = "labor_company_id";

    public static final String ID_CARD = "id_card";
    public static final String ID_CARD_FRONT = "id_card_front";
    public static final String ID_CARD_BACK = "id_card_back";

    public static final String CREATE_TIME = "create_time";

    public static final String DEL_FLAG = "del_flag";


    public AdminLaborUser(String userPhone) {
        this.userPhone = userPhone;
        this.delFlag = 0;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "AdminLaborUser{" +
                "id=" + id +
                ", userName=" + userName +
                ", userPhone=" + userPhone +
                ", userPwd=" + userPwd +
                ", laborCompanyId=" + laborCompanyId +
                ", createTime=" + createTime +
                ", delFlag=" + delFlag +
                "}";
    }
}
